#ifndef ALGORITHM_H
#define ALGORITHM_H

#include "qdebug.h"
#include <cmath>

#define     PI                  3.14159f
#define     EQUATER_V           463.310f
#define     EARTH_GRAVITY       9.80665f
#define     EQUATER_ACCL        0.03400f

class StageBody
{

public:
    uint8_t StageIndex;

    float   Isp;
    float   Gravity;
    float   Mdry;
    float   Mfull;
    float   Mseparate;
    float   DtmRatio;

    virtual ~StageBody();

private:

    float   ObtainDeltaV();

};

class ShipBody
{
    Q_OBJECT


public:

    uint8_t StageAmount;

    float   Mfull;
    float   Latitude;
    float   OrbitAngle;
    float   TargetDeltaV;

    float   EarthGravity;
    float   EarthV;

    ShipBody();
    ~ShipBody();
private:

    static  float   NormalizeAngle(float Angle);
};

#endif // ALGORITHM_H
